<?php
class ModelController extends CommonController{
	public $order='sort asc';
	public function indexBefore(){
		$this->assign('car_list',M('Car')->oneField('name','id')->select());
	}
	public function saveBefore(){
		if($this->isGet()){
			$this->assign('car_list',M('Car')->order($this->order)->select());
		}
	}
	public function updateBefore(){
		$this->saveBefore();
	}
}